package com.bear.fastrepair.http.api.employee

import com.bear.fastrepair.entity.*
import okhttp3.ResponseBody
import retrofit2.http.*

interface EmployeeService2 {
    /**
     * 获取个人信息
     * @return EmployeeInfo2
     */
    @POST("mobile/employee/info")
    suspend fun getPersonalInfo(): EmployeeInfo2

    /**
     * 员工登录
     * @param employeeLoginBody EmployeeLoginBody
     * @return ResponseInfo
     */
    @POST("mobile/employee/login")
    suspend fun login(@Body employeeLoginBody: EmployeeLoginBody): ResponseInfo

    /**
     * 重置密码
     * @param resetPasswordBean ResetPasswordBean
     * @return ResponseInfo
     */
    @PUT("mobile/employee/resetPasswd")
    suspend fun resetPassword(@Body resetPasswordBean: ResetPasswordBean): ResponseInfo

    /**
     * 刷新员工位置信息
     * @param location UpdateLocation
     * @return ResponseInfo
     */
    @PUT("mobile/employee/updateLocation")
    suspend fun updateLocation(@Body location: UpdateLocation): ResponseInfo

    /**
     * 更新员工工作状态
     * @param workStatus EmployeeWorkStatus
     * @return ResponseInfo
     */
    @PUT("mobile/employee/updateWorkStatus")
    suspend fun updateWorkStatus(@Body workStatus: EmployeeWorkStatus): ResponseInfo

    @GET("appVersion/latestVersionInfo")
    suspend fun updateApp(): AppVersionResponse

    @Streaming
    @GET
    suspend fun downloadApp(@Url fileUrl: String): ResponseBody
}